import request from '@/utils/request'

// 查询告警列表
export function listWarnInfo(query) {
  return request({
    url: '/swla2/warnInfo/list',
    method: 'get',
    params: query
  })
}

// 查询告警详细
export function getWarnInfo(ID) {
  return request({
    url: '/swla2/warnInfo/' + ID,
    method: 'get'
  })
}

// 新增告警
export function addWarnInfo(data) {
  return request({
    url: '/swla2/warnInfo',
    method: 'post',
    data: data
  })
}

// 修改告警
export function updateWarnInfo(data) {
  return request({
    url: '/swla2/warnInfo',
    method: 'put',
    data: data
  })
}

// 删除告警
export function delWarnInfo(ID) {
  return request({
    url: '/swla2/warnInfo/' + ID,
    method: 'delete'
  })
}
